﻿<Button Icon="fa fa-fa" Text="模态对话框" Color="Color.Success" OnClick="@ShowModal" />

@code {
    private Logger? Trace { get; set; }

    private async Task ShowModal()
    {
        var op = new SwalOption()
        {
            Title = "模态对话框示例",
            Content = "模态对话框内容，不同按钮返回不同值",
            IsConfirm = true
        };
        var ret = await SwalService.ShowModal(op);

        Trace?.Log($"模态弹窗返回值为：{ret}");
    }
}